﻿using System;
using System.Windows.Input;
using GalaSoft.MvvmLight.Command;
using JustinAngel.Neurons.Framework;
using JustinAngel.Neurons.Framework.Navigation;
using JustinAngel.UnitedNationsNews.AppCore;
using JustinAngel.UnitedNationsNews.Services;
using Newtonsoft.Json;

namespace JustinAngel.UnitedNationsNews.ItemViewMoels
{
    [JsonObject(MemberSerialization.OptIn)]
    public class RadioItemViewModel : VViewModelBase, IShareableOnSocialNetworks
    {
        [JsonProperty]
        public Uri Mp3Uri { get; set; }

        [JsonProperty]
        public string Title { get; set; }

        public Uri Link
        {
            get { return Mp3Uri; }
        }

        public string Content
        {
            get { return string.Empty; }
        }

        public ICommand NavigateToRadio
        {
            get
            {
                return new RelayCommand(() =>
                    MessengerInstance.Send(new NavigateToMessage(PageSources.VideoPage, this)));
            }
        }

        public bool IsNowPlayingRestore { get; set; }
        public bool IsHistoryTileRestore { get; set; }
    }
}